import { createApp } from 'vue'
import App from './App.vue'
//引入router
import router from './router'
//导入axious
import axios from 'axios'
//导入element-plus
import ElementPlus from 'element-plus'
//导入element-plus样式
import 'element-plus/dist/index.css'
//导入element-icons
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
//导入pinia
import { createPinia } from 'pinia'

const app = createApp(App)
const pinia = createPinia()

//挂载element-plus
app.use(ElementPlus)

//挂载element-icons
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}

//挂载设置axios
app.config.globalProperties.$http = axios

//挂载router
app.use(router)

//挂载pinia
app.use(pinia)


app.mount('#app')